<template>
    <div class="comment">
        <van-nav-bar
        border
        title="订单详情"
        left-text="返回"
        left-arrow
        @click-left="onClickLeft"
        />
        <div class="commentgrey">
            <div>产品名称:{{details['orderLines'][0]['product']['name']}} 下单次数:x{{details.orderLines[0].number}}</div>
            <div>总价:{{details.total}}</div>
            <div>服务时间:{{details.orderTime | dateParse}}</div>
            <div>服务地点:{{(((details==null)?'0':details.address)==null)?'':(details.address.province+details.address.city+details.address.area+details.address.address)}}</div>
        </div>
        
    </div>
</template>
<script>
import {mapState,mapActions} from 'vuex'
export default {
    data(){
        return{
            active:'two'
        }
    },
    created(){
        this.finddetails(this.$route.query.id)
    },
    computed:{
        ...mapState('order',['details'])
    },
    methods:{
        ...mapActions('order',['finddetails']),
        onClickLeft(){
            this.$router.push({path:'order'})
        },
    }
}
</script>
<style  scoped>
.comment{
    width: 100%;
    height:100%;
}
.commentgrey{
    border-radius: 5px;
    background-color: #f1f1f1;
    margin: 0 auto;
    width: 90%;
    padding: 10px;
}
.commentgrey>div{
    margin: 10px;
}
.footer>div{
    display: inline-block;
    margin: 10px;
}
</style>